package com.woniuxy.dudugua.mapper;

import com.woniuxy.dudugua.entity.Coupon;
import com.woniuxy.dudugua.entity.CouponExample;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.woniuxy.dudugua.util.view.AdminOrderView;
import com.woniuxy.dudugua.util.view.CouponsStoreView;
import com.woniuxy.dudugua.util.view.CouponsView;
import org.apache.ibatis.annotations.Param;

public interface CouponMapper {
    long countByExample(CouponExample example);

    int deleteByExample(CouponExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Coupon record);

    int insertSelective(Coupon record);

    List<Coupon> selectByExample(CouponExample example);

    Coupon selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Coupon record, @Param("example") CouponExample example);

    int updateByExample(@Param("record") Coupon record, @Param("example") CouponExample example);

    int updateByPrimaryKeySelective(Coupon record);

    int updateByPrimaryKey(Coupon record);

    List<CouponsView> selectUserCoupons();

    List<Coupon> selectAllCoupon(Map<String,Integer> map);

    Integer    addByCoupon(Coupon coupon) throws  Exception;

    List<CouponsStoreView> selectAllCouponsView();

    List<CouponsStoreView> selectUserCoponsView(int userid);
}